package com.mcxx.ansync.listener;

import com.mcxx.ansync.annotation.BizEvent;
import com.mcxx.modules.miniSalvation.order.service.write.NoticeBoardDetailWriteService;
import com.mcxx.modules.temporary.event.TmpNoticeBoardEvent;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;

@Slf4j
@TaTransactional
@Component
@EnableAsync
public class TmpNoticeBoardListener implements ApplicationListener<TmpNoticeBoardEvent> {
    @Autowired
    private NoticeBoardDetailWriteService noticeBoardDetailWriteService;

    @Async
    @Override
    @BizEvent("公式添加成员事件")
    public void onApplicationEvent(TmpNoticeBoardEvent event) {
        //noticeBoardDetailWriteService.insertBySelect(event.getNoticeBoardSearchOrderParam(),event.getUserAccountVo());
    }
}
